﻿using HK.Core.Common.Data;
using HK.Core.Encryption.Protocol;

namespace HK.Core.IO.Protocol.Output
{
    
    /// <summary>
    /// 加密方式
    /// </summary>
    public enum EncryptOption
    {
        /// <summary>
        /// Token
        /// </summary>
        Token,
        
        /// <summary>
        /// Aes
        /// </summary>
        Aes,
        
        /// <summary>
        /// Des
        /// </summary>
        Des
        
    }

    /// <summary>
    /// 接口 : 加密文件I/O协议 - Token
    /// </summary>
    public interface ITokenFileIO<out TData> : IFileIO<TData>
        where TData : JsonData
    {
        
        /// <summary>
        /// Token算法
        /// </summary>
        TokenAlgorithms Algorithms { get; }        
        
        /// <summary>
        /// 密钥
        /// </summary>
        string SecretKey { get; }
    }

    /// <summary>
    /// 接口 : 加密文件I/O协议
    /// </summary>
    /// <typeparam name="TData"></typeparam>
    public interface IEncryptFileIo<out TData> : IFileIO<TData>
        where TData : JsonData
    {
        /// <summary>
        /// 密钥
        /// </summary>
        string SecretKey { get; }
    }
}
